/************************************************************
	File:		Enemy.h
	Author:		Mitchel Mishiev, Keisuke Miyazaki
	Purpose:	CEnemy class controls the enemies
************************************************************/

#pragma once
#include "entity.h"
class CEnemy : public CEntity
{
public:
	CEnemy(void);
	~CEnemy(void);

	virtual void	Update( float fElapsedTime ) override;
	virtual void	Render( void ) override;

	virtual void	HandleCollision( const IEntity* pOther ) override;

	void    SwitchAI( void );
	void	TestPatrol ( int PatrolDirection );

	//	Accessors

	int		GetDamage() { return m_nSouls; }
	int		GetCurrency() { return m_nDamage; }
	int		GetAIState() { return m_nAIState; }

	//	Mutators

	void	SetDamage(int dmg) { m_nSouls = dmg; }
	void	SetCurrency(int currency) { m_nDamage = currency; }
	void	SetAIState(int state) { m_nAIState = state; }

	void	StayInBoundaries( void );

private:

	int m_nSouls;
	int m_nDamage;
	int m_nAIState;
	
	// Assets
	int m_nImageID;
	int m_nOuchSfxID;
	int m_nRunSfxID;
	int m_nHeySfxID;

	float m_fSoundtimer;
	float m_fDmgTimer;
	bool  m_bIsHit;

	float m_fPatrolTimer;
	float m_fShootTimer;

	enum Direction { dUp = 0, dDown, dLeft, dRight, dStill };
	int m_nPatrolDirection;

	bool	m_bIsDead;
	float	m_fDeadtimer;
};

